﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_Masters/Default.Master" AutoEventWireup="true" CodeBehind="PermissionManager.aspx.cs" Inherits="Hutech.CRM.Web.Admin.PermissionManager" %>
<%@ Register src="~/Controls/ManageRoleAndModule/PopupAddNewItemPermission.ascx" tagname="PopupAddNewItemPermission" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
<span id="tabid" style="display: none">AdminMenu</span>

    <asp:UpdatePanel ID="pnlMain" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper admin rolemanager">
                <div class="modulecontent">
                    <div class="catology-metro">
                        <div class="left"><img class="ImageNomalHome-32" title="Home" src="../Resources/img/none-32.png" /></div>
                        <asp:HyperLink ID="lnkAdminMenu" runat="server" NavigateUrl="~/Admin/AdminMenu.aspx" />&nbsp;&gt;
                        <b><span id="spnTitle" runat="server"></span></b>
                    </div>
                    <div class="settingrow">
                        <asp:Label ID="lblError" runat="server" CssClass="txterror" />
                    </div>
                    <div class="settingrow">
                        <div class="left"><i><u>Chú ý</u>: [Tên module] Dành cho lập trình viên. [Mô tả] Dành cho người dùng.</i></div>
                        <div class="right">
                            <asp:LinkButton ID="LinkButtonThemMoi" runat="server" Text="Thêm mới" Width="100px" />
                        </div>
                    
                        <%-- Tên module: <asp:TextBox ID="TextBoxNewModuleName" runat="server" MaxLength="50" CssClass="mediumtextbox"></asp:TextBox>
                        Mô tả: <asp:TextBox ID="TextBoxDecription" runat="server" MaxLength="50" CssClass="mediumtextbox"></asp:TextBox>
                        <mC:tsButton runat="server" ID="ButtonAddModule" />--%>
                    </div>
                    <br />
                    <%--<div class="line"></div>--%>
                    <div class="settingrow">
                        <%--<i>Chú ý: Chức năng Xoá hiện chưa được cập nhật. Vui lòng cẩn trọng khi thêm Module mới.</i><br />--%>
                        <asp:DataList ID="DataListAction" DataKeyField="ActionGuid" runat="server">
                            <ItemTemplate>
                                <asp:ImageButton ImageUrl='<%# EditPropertiesImage %>' CommandName="edit" AlternateText="<%# Resources.Resource.RolesEditLabel %>"
                                    ToolTip="<%# Resources.Resource.RolesEditLabel %>" runat="server" ID="btnEdit" />&nbsp;&nbsp;
                                <asp:ImageButton ImageUrl='<%# DeleteLinkImage %>' CommandName="delete" AlternateText="<%# Resources.Resource.RolesDeleteLabel %>"
                                    ToolTip="<%# Resources.Resource.RolesDeleteLabel %>" runat="server" ID="btnDelete" />
                                &nbsp;&nbsp;
                                <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "ActionName") %>' runat="server" ID="Label1" />: &nbsp;
                                <i><asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>' runat="server" ID="Label2" /></i>
                                <%--<asp:HyperLink ID="lnkMembers" runat="server" Text='<%# Resources.Resource.RolesChangeMemberLabel %>'
                                    ToolTip='<%# Resources.Resource.RolesChangeMemberLabel %>' NavigateUrl='<%# SiteRoot + "/Admin/UserGroupInModule.aspx?moduleid=" + DataBinder.Eval(Container.DataItem, "ModuleID") %>' />--%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                Name: 
                                <asp:TextBox ID="TextBoxActionName" Width="200" Text='<%# DataBinder.Eval(Container.DataItem, "ActionName") %>' runat="server" />
                                &nbsp;
                                Action: 
                                <asp:TextBox ID="TextBoxActionCommand" Width="200" Text='<%# DataBinder.Eval(Container.DataItem, "ActionCommand") %>' runat="server" />
                                &nbsp;
                                <mC:tsButton Text="<%# Resources.Resource.RolesApplyLabel %>" ToolTip="<%# Resources.Resource.RolesApplyLabel %>" CommandName="apply" runat="server" ID="Button1" />
                                &nbsp;
                                <mC:tsButton Text="<%# Resources.Resource.RoleManagerCancelButton %>" ToolTip="<%# Resources.Resource.RoleManagerCancelButton %>" CommandName="cancel" runat="server" ID="Button2" />
                                <br />
                                Description: 
                                <asp:TextBox ID="TextBoxActionDecription" Width="430" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>' runat="server" />
                            </EditItemTemplate>
                        </asp:DataList>
                    </div>
                </div>
            </asp:Panel>
            <div class="line"></div>
            <uc1:PopupAddNewItemPermission ID="PopupAddNewItemPermission1" runat="server" />
        </ContentTemplate>

        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="LinkButtonThemMoi" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="DataListAction" EventName="ItemCommand" />
            
            <%--<asp:AsyncPostBackTrigger ControlID="DataListAction" EventName="command" />--%>
            <%--<asp:AsyncPostBackTrigger ControlID="PopupAddUser1" EventName="ReloadData" />
            <asp:AsyncPostBackTrigger ControlID="pgrItems" EventName="Command" />--%>
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentLeft" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentRight" runat="server">
</asp:Content>
